package com.grape.transaction.lcn.fegin;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "test",url = "http://127.0.0.1:6667/user", fallback = ServiceCFallback.class)
public interface ProducerFegin {
    @GetMapping
    void addUser(@RequestParam("i") String i);
}



@Component
class ServiceCFallback implements ProducerFegin{

    @Override
    public void addUser(String i) {
        System.out.println("huidiao ");
    }
}